/* va_end example */
#include <stdio.h>
#include <stdarg.h>

void PrintLines(char* first, ...)
{
  char *str;
  va_list vl;

  str = first;

  va_start(vl, first);

  do {
    printf("%s\n", str);
    str = va_arg(vl, char*);
  } while (str != NULL);

  va_end(vl);
}

int main()
{
  PrintLines("First","Second","Third","Fourth",NULL);
  return 0;
}